<?php
/**
{
    "uid": "INT //",
    "username": "VARCHAR //用户名@hide",
    "province": "VARCHAR //省份",
    "pwd": "VARCHAR //密码@hide",
    "privileges": "TEXT //管理员权限@status; yunying::运营::@admin; super::超级用户::@admin",
    "created": "DATETIME //创建时间",
    "updated": "DATETIME //更新时间"
}
 */

class AdminUser extends Base
{
    
	private $uid= '';//
	private $username= '';//用户名@hide
	private $province= NULL;//省份
	private $pwd= '';//密码@hide
	private $privileges= '';//管理员权限@status;yunying::运营::@admin;super::超级用户::@admin
	private $created= 'CURRENT_TIMESTAMP';//创建时间
	private $updated= NULL;//更新时间

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_admin_user';
    }
    
    public  function key(){
        return 'uid';
    }


    
    public static  function hideField()
    {
        return array (  0 => 'username',  1 => 'pwd',);
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return [];
    }
            
    public static  function deleteField()
    {
        return [];
    }
            
    public function className()
    {
        return 'AdminUser';
    }
    
    public  function field()
    {
        return array (  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '',  ),  'username' =>   array (    0 => 'VARCHAR',    1 => 50,    2 => '用户名@hide',  ),  'province' =>   array (    0 => 'VARCHAR',    1 => 128,    2 => '省份',  ),  'pwd' =>   array (    0 => 'VARCHAR',    1 => 32,    2 => '密码@hide',  ),  'privileges' =>   array (    0 => 'TEXT',    1 => 0,    2 => '管理员权限@status;yunying::运营::@admin;super::超级用户::@admin',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建时间',  ),  'updated' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '更新时间',  ),);
    }


}